<html>
<head>
    <meta charset="UTF-8">
    <title>详情</title>
</head>
<link rel="stylesheet" href="/static/layui/css/layui.css" />
<body>
<form class="layui-form"  action="" lay-filter="edit">
    <input type="hidden" name="pid">
    <div class="layui-form-item">
        <label class="layui-form-label">患者编号</label>
        <div class="layui-input-inline layui-col-md4">
        <input type="text" name="puser" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">角色</label>
        <div class="layui-input-inline layui-col-md4">
        <input type="text" name="roleType" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">医院名称</label>
        <div class="layui-input-inline layui-col-md4">
        <input type="text" name="hname" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">治疗医生</label>
        <div class="layui-input-inline layui-col-md4">
        <input type="text" name="dname" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">临床资料:</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="" value="" lay-verify="required|aname" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">临床诊断</label>
        <div class="layui-input-inline layui-col-md4">
        <input type="text" name="uposition" lay-verify="required|aname" lay-reqtext="项目名称是必填项，岂能为空？" placeholder="请输入项目名称" autocomplete="off" class="layui-input">
        </div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">检测项目:</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="project"  lay-verify="required|aname" lay-reqtext="项目名称是必填项，岂能为空？" placeholder="请输入项目名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">检测结果:</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="result" value="" lay-verify="required|aname" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">检测结果:</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="" value="" lay-verify="required|aname" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">遗传诊断报告:</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="" value="" lay-verify="required|aname" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">账号：</label>
        <div class="layui-input-inline">
            <input type="text" name="puser" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码：</label>
        <div class="layui-input-inline">
            <input type="text" name="ppassword" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名字：</label>
        <div class="layui-input-inline">
            <input type="text" name="pname" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机：</label>
        <div class="layui-input-inline">
            <input type="text" name="pphone" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">电子邮箱：</label>
        <div class="layui-input-inline">
            <input type="text" name="pemail" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别:</label>
        <div class="layui-input-block">
            <input type="radio" name="psex" value="0" title="男">
            <input type="radio" name="psex" value="1" title="女" checked>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址：</label>
        <div class="layui-input-inline">
            <input type="text" name="paddress" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">时间：</label>
        <div class="layui-input-inline">
            <input type="text" name="ptime" id="ptime" lay-verify="ptime" placeholder="yyyy-MM-dd"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">启用状态:</label>
        <div class="layui-input-block">
            <input type="radio" name="pstatus" value="0" title="停用">
            <input type="radio" name="pstatus" value="1" title="已使用" checked>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否发送:</label>
        <div class="layui-input-block">
            <input type="radio" name="send" value="0" title="是">
            <input type="radio" name="send" value="1" title="否" checked>
        </div>
    </div>
</form>
</body>

<script src="/static/js/system.js"></script>
<script src="/static/js/jquery-3.3.1.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
    $(function () {
        $("input").prop("disabled","disabled");
    })
    layui.use(['form','layer'], function(){
        var form = layui.form;
        $.ajax({
            url:'/patient/findByid',
            type:"post",
            dataType:"json",
            data:{"pid":getQueryString("pid")},
            success:function (da) {
                if (da.code == 200) {
                    form.val("edit", da.date);
                    form.val("edit", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
                        "ptime": layui.util.toDateString(da.ptime, 'yyyy-MM-dd'),
                        "dname":da.date.doctor.dname,
                        "roleType":da.date.role.roleType,
                        "hname":da.date.hospital.hname,
                        "result":da.date.files.uposition==1?da.date.files.cname:"暂无咋检测结果",
                        "uposition":da.date.files.uposition==2?da.date.files.cname:"暂无临床诊断",
                        "project":da.date.files.cname
                    });
                } else {
                    parent.layer.msg("详情查询失败！");
                }
            }
        });
    });

</script>
</html>